import QtQuick 2.0

Item {
    id: view
    property string source: ''
    property variant model: ListModel {}
    signal preview(string source)
    Loader {
        id: loader
        anchors.fill: parent
        source: /*'FolderView/' +*/ view.source
//        property variant model: view.model
        /*onLoaded: {
            console.log('source>>>  ', source, view.model.count);
            // item.model = view.model
        }
        //TextEdit { id: myTextField; text: "Please type here..." }*/
        Binding {
            target: loader.item
            property: "model"
            value: view.model
        }

        Connections {
            target: loader.item
            onPreview: view.preview(source)
        }
    }
}

